#include "Entity.h"

long long Entity::cNextID = 0;

Entity::Entity(const QPoint& position)
  : mPosition(position), mID(cNextID++)
{}

Entity::~Entity() {}

void Entity::setPosition(const QPoint &newPosition)
{
  mPosition = newPosition;
}

void Entity::move(const QVector2D &direction)
{
  mPosition.setX(mPosition.x() + direction.x());
  mPosition.setY(mPosition.y() + direction.y());
}

const QPoint& Entity::position() const
{
  return mPosition;
}

bool Entity::operator ==(const Entity& rhs) const
{
  return mID == rhs.mID;
}
